package org.sy.lab.网上多线程例子.柜台取钱;

public class PersonB extends Thread {

	Bank bank;
	
	public PersonB(Bank bank) {
		this.bank = bank;
	}
	
	@Override
	public void run() {
		while(Bank.money >= 100) {
			bank.ATM(200);
		}
		
		try {
			sleep(100);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
